﻿using IntelligentAgriculture.Contracts.Dto.Input;
using IntelligentAgriculture.Contracts.Dto.Output;
using IntelligentAgriculture.Domain.Entity;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace IntelligentAgriculture.Contracts.Interface
{

    /// <summary>
    /// 服务接口
    /// </summary>
    public interface IHistoryRecordService
    {

        /// <summary>
        /// 历史记录显示
        /// </summary>
        /// <param name="input">查询参数</param>
        /// <returns><返回数据/returns>
        Task<PageOutput<HistoryOutPut>> GetHistoryRecordsAsync(HistoryInput? input);



        /// <summary>
        /// 逻辑删除历史记录数据
        /// </summary>
        /// <param name="hrid">主键id</param>
        /// <returns>受影响的行数</returns>
        Task<int> DeleteHistoryrecord(int hrid);

        /// <summary>
        /// 批量逻辑历史记录表
        /// </summary>
        /// <param name="hrids">id</param>
        /// <returns>返回数据</returns>
        Task<int> DeleteRangeHistoryrecord(IEnumerable<int> hrids);



        /// <summary>
        /// 添加种母历史记录数据
        /// </summary>
        /// <param name="inputs">实体</param>
        /// <returns>返回受影响的行数</returns>
        Task<int> AddHistoryrecordAsync(List<Historyrecord> inputs);


        /// <summary>
        /// 反填种母历史记录表
        /// </summary>
        /// <param name="earTag">根据耳号反填</param>
        /// <returns>返回数据</returns>
        Task<HistoryOutPut> GetHistoryByIdAsync(string? earTag);

        /// <summary>
        /// 修改种母历史记录表
        /// </summary>
        /// <param name="input">实体</param>
        /// <returns>返回受影响的行数</returns>
        Task<int> UpdateAsync(Historyrecord history);

    }
}
